package remote_work.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author LiuPing
 *
 * 2018年3月12日
 */
public class MyProperties extends Properties{
	
	private static final long serialVersionUID = 5107251348456879523L;
	
	private static MyProperties myproperties;
	
	private MyProperties(){
		InputStream is = MyProperties.class.getClassLoader().getResourceAsStream("db.properties");
		try {
			super.load(is);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static MyProperties getInstance(){
		if(myproperties ==null){
			myproperties = new MyProperties();
		}
		return myproperties;
	}
}